package ink.onei.system.service.impl;

import java.util.List;

import ink.onei.common.core.domain.entity.SysUser;
import ink.onei.system.domain.vo.PeopleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ink.onei.system.mapper.PrivateLetterMapper;
import ink.onei.system.domain.PrivateLetter;
import ink.onei.system.service.IPrivateLetterService;

/**
 * 私信Service业务层处理
 *
 * @author zheng
 * @date 2024-02-15
 */
@Service
public class PrivateLetterServiceImpl implements IPrivateLetterService
{
    @Autowired
    private PrivateLetterMapper privateLetterMapper;

    /**
     * 查询私信
     *
     * @param id 私信主键
     * @return 私信
     */
    @Override
    public PrivateLetter selectPrivateLetterById(Long id)
    {
        return privateLetterMapper.selectPrivateLetterById(id);
    }
    /**
     * look私信
     *
     * @param id 私信主键
     * @return 私信
     */
    @Override
    public PrivateLetter selectLetterLookById(Long id)
    {
        return privateLetterMapper.selectLetterLookById(id);
    }

    /**
     * 查询私信列表
     *
     * @param privateLetter 私信
     * @return 私信
     */
    @Override
    public List<PrivateLetter> selectPrivateLetterList(PrivateLetter privateLetter)
    {
        return privateLetterMapper.selectPrivateLetterList(privateLetter);
    }

    /**
     * 新增私信
     *
     * @param privateLetter 私信
     * @return 结果
     */
    @Override
    public int insertPrivateLetter(PrivateLetter privateLetter)
    {
        return privateLetterMapper.insertPrivateLetter(privateLetter);
    }

    /**
     * 修改私信
     *
     * @param privateLetter 私信
     * @return 结果
     */
    @Override
    public int updatePrivateLetter(PrivateLetter privateLetter)
    {
        return privateLetterMapper.updatePrivateLetter(privateLetter);
    }

    /**
     * 批量删除私信
     *
     * @param ids 需要删除的私信主键
     * @return 结果
     */
    @Override
    public int deletePrivateLetterByIds(Long[] ids)
    {
        return privateLetterMapper.deletePrivateLetterByIds(ids);
    }

    /**
     * 删除私信信息
     *
     * @param id 私信主键
     * @return 结果
     */
    @Override
    public int deletePrivateLetterById(Long id)
    {
        return privateLetterMapper.deletePrivateLetterById(id);
    }

    /**
     * 查看私信信息
     *
     * @param privateLetter 返回信件
     * @return 结果
     */
//    @Override
//    public int updatestatus(PrivateLetter privateLetter)
//    {
//        return privateLetterMapper.updatestatus(privateLetter);
//    }
    @Override
    public List<SysUser> selectUserLists() {
        return privateLetterMapper.selectUserLists();
    }
}
